import http from "@/api";

interface IGetCallListType {
  page: number;
  pageSize: number;
  ai_platform?: number;
}
export interface ICreateCallType {
  ai_platform?: number;
  ai_uid: string;
  call_bgm_url?: string;
  call_cover_url?: string;
  call_video_url?: string;
  call_description?: string;
  call_weight: number;
}
export interface IUpdateCallType {
  ai_platform?: number;
  ai_uid: string;
  call_bgm_url?: string;
  call_cover_url?: string;
  call_video_url?: string;
  call_description?: string;
  call_weight: number;
  id: string;
}
export interface IDeleteCallType {
  ai_platform?: number;
  id: string;
}

// 获取用户ai列表
export const getCallList = (params: IGetCallListType) => {
  return http.post(`/admin/call_ai_user/list`, params);
};

export const createCall = (params: ICreateCallType) => {
  return http.post(`/admin/call_ai_user/save`, params);
};

export const updateCall = (params: IUpdateCallType) => {
  return http.post(`/admin/call_ai_user/update`, params);
};

export const deleteCall = (params: IDeleteCallType) => {
  return http.post(`/admin/call_ai_user/delete`, params);
};
